package com.zjitc;

/**
 * Create By IntelliJ IDEA
 *
 * @Author: jsonor
 * @Create-Time: 2017/9/18 13:51
 * @Description: 数据库的查询对象
 */
public class User {

  private Integer id;
  private String name;

  public User() {
    this(0, null);
  }

  public User(int id, String name) {
    this.id = id;
    this.name = name;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  /**
   * Override
   *  1. 直观
   *  2. 提示和检查的作用
   * @return
   */
  @Override
  public String toString() {
    return "User{" +
        "id=" + id +
        ", name='" + name + '\'' +
        '}';
  }
}
